import { findById } from "@/services/student";
export default{
    namespaced: true,
    state:{
        updateVisible:false,
        student:{}
    },
    mutations:{
        setUpdateVisible(state,updateVisible){
            state.updateVisible = updateVisible;
        },
        setStudent(state,student){
            state.student = student;
        }
    },
    actions:{
        async fetchStudent(context,id){
            let data = await findById(id);
            context.commit('setStudent',data);
        }
    }
}